import React, { Component } from 'react'
// rcc => React Class Component

// !1. 给按钮绑定点击事件
// ?2. 获取原来的数字
// 3. 在原来的基础上 +1

export default class App extends Component {
  state = {
    count: 0,
  }
  // handleClick() {}
  handleClick = () => {
    console.log(this.state.count)
  }
  render() {
    return (
      <div style={{ textAlign: 'center' }}>
        <h3>计数器：{this.state.count}</h3>
        <button onClick={this.handleClick}>+1</button>
      </div>
    )
  }
}
